//////////////////////////////////////////////////////////////////////////////
//
//  Created by Philip Mulcahy on 27/09/2012.
//  Copyright (c) 2012 Philip Mulcahy. All rights reserved.
//
//  This file is part of the note-recog library.
//
//  note-recog is free software: you can redistribute it and/or modify
//  it under the terms of version 3 of the GNU Lesser General Public License 
//  as published by the Free Software Foundation.
//
//  note-recog is distributed is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with note-recog.  If not, see <http://www.gnu.org/licenses/>.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef DETECTOR_H
#define DETECTOR_H

#include "Detector.h"
#include "IEventListener.h"

class PitchDetector : public Detector {
public:
    class Event
    {
    private:
        float _pitch;
    public:
        float getPitch() const;
        Event(float pitch);
    };
    typedef IEventListener<PitchDetector::Event> Listener;
    PitchDetector(Listener&);
    virtual ~PitchDetector();
private:
    PitchDetector(const PitchDetector&); // not implemented
    PitchDetector& operator=(const PitchDetector&); // not implemented
public:
    virtual void submitFrame(const Frame& frame);
private:
    Listener& _listener;
};

#endif